package com.renjun.smweb.service.NewsService;

import com.alibaba.fastjson.JSONObject;
import com.renjun.smweb.exceptions.BaseException;
import com.renjun.smweb.exceptions.BaseException;

import java.sql.SQLException;
import java.text.ParseException;
import java.util.Map;

/**
 * Created by lrs on 2017/2/28.
 */
public interface NewsService {


    /**
     * 添加系统公告
     * @param params params:{}
     * @return json
     * @throws SQLException
     */
    JSONObject addNews(Map<String,Object> params) throws SQLException, BaseException;

    /**
     * 修改系统公告
     * @param params params:{}
     * @return json
     * @throws SQLException
     */
    JSONObject modifyNews(Map<String,Object> params) throws SQLException, ParseException, BaseException;

    /**
     * 查询系统公告/系统公告列表
     * @param params params:{}
     * @return json
     * @throws SQLException
     */
    JSONObject queryNews(Map<String,Object> params) throws SQLException;

    /**
     * 查看系统公告/系统公告详情
     * @param params params:{}
     * @return json
     * @throws SQLException
     */
    JSONObject getNews(Map<String,Object> params) throws SQLException, BaseException;


    /**
     * 删除系统公告
     * @param params params:{}
     * @return json
     * @throws SQLException
     */
    JSONObject cancelNews(Map<String, Object> params) throws SQLException, BaseException;

    /**
     * 恢复系统公告
     * @param params params:{}
     * @return json
     * @throws SQLException
     */
    JSONObject recoverNews(Map<String, Object> params) throws SQLException, BaseException;

    /**
     * 管理员登录后系统公告弹出框信息
     * @param params params:{}
     * @return json
     * @throws SQLException
     */
    JSONObject loginQueryNewsList(Map<String, Object> params)throws SQLException;
}
